projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9399229
)
Fix #3107. rustdoc without --target if compiled for host
author
Phaiax
<phaiax-git@invisibletower.de>
Sun, 25 Sep 2016 12:10:01 +0000
(14:10 +0200)
committer
Phaiax
<phaiax-git@invisibletower.de>
Sun, 25 Sep 2016 12:10:01 +0000
(14:10 +0200)
src/cargo/ops/cargo_rustc/mod.rs
patch
|
blob
|
history
diff --git
a/src/cargo/ops/cargo_rustc/mod.rs
b/src/cargo/ops/cargo_rustc/mod.rs
index b36ed3cebd14ab52a784a96215de750e81013013..d6ba15480849c71c4e3e1b01d6ff15c1c110d7da 100644
(file)
--- a/
src/cargo/ops/cargo_rustc/mod.rs
+++ b/
src/cargo/ops/cargo_rustc/mod.rs
@@
-402,8
+402,10
@@
fn rustdoc(cx: &mut Context, unit: &Unit) -> CargoResult<Work> {
.cwd(cx.config.cwd())
.arg("--crate-name").arg(&unit.target.crate_name());
- if let Some(target) = cx.requested_target() {
- rustdoc.arg("--target").arg(target);
+ if unit.kind != Kind::Host {
+ if let Some(target) = cx.requested_target() {
+ rustdoc.arg("--target").arg(target);
+ }
}
let doc_dir = cx.out_dir(unit);